During the course of a simulation, iDynoMiCS will save output files describing the current agent states. These output files will be written at the interval specified by the outputPeriod parameter in the simulator mark-up of the simulation protocol file (see Protocol File section of iDynoMiCS tutorial for more information). In each file name, the number in brackets represents the simulation timestep at which the file was written. The agent_State and agent_Sum files describe the state of the agents in the system; the agent_State file describes each agent in detail, while the agent_Sum file summarizes the agents on the species level.The previous technique read the file into a structure that can be processed in R. This section describes methods that can be utilised to extract data from an agent_state or agent_sum file for processing using statistical methods. This provides the user with the basic functionality to extract the data they need, then write their analysis scripts accordingly. Some example analysis scripts that use the methods in this section have been provided, and are described in Technique 3.
The following methods are available for both agent_State and agent_Sum files:
agent_returnSimIteration: Returns the simulation iteration that produced this output file.
agent_returnSimTime: Returns the simulation time represented by that iteration number (hours).
agent_returnGridResolution: Returns the grid resolution of the simulation domain.
agent_returnIVoxels: Returns the number of voxels in the I direction of the domain.
agent_returnJVoxels: Returns the number of voxels in the J direction of the domain.
agent_returnKVoxels: Returns the number of voxels in the K direction of the domain.
agent_returnSpeciesResultData: Extracts all of the species information from the file, storing each species in a list. The method returns a list, containing each species list. Relevant simulation responses can then be extracted from the relevant list.
agent_returnNumSpecies: Returns the number of species in this results file.
agent_returnSpeciesColumnTotal: For a particular species and simulation response of interest (stored in columns in the result file), returns the total of that response. For example, if there were 100 individuals of a particular species, this totals all responses of a specified response.